refactor(trending): use MMDS HeaderStandard#29707
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| testID="trending-token-network-bottom-sheet" | ||
| > | ||
| <HeaderCompactStandard | ||
| <HeaderStandard |
There was a problem hiding this comment.
Close button may silently disappear in bottom sheets
High Severity
The old HeaderCompactStandard explicitly converted onClose/closeButtonProps into a close ButtonIcon added to endButtonIconProps. Every existing usage of HeaderStandard in the codebase (MoneyHeader, PerpsHomeHeader) uses only onBack/backButtonProps/endButtonIconProps — none pass onClose or closeButtonProps. If HeaderStandard doesn't implement the same convenience-prop-to-button transformation, the close button in all three bottom sheets silently vanishes without any error.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 3bfd0f2. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Impact Assessment: These are purely UI component swaps with no business logic changes. The Tag Selection: Performance: No performance impact expected - this is a component swap within the same rendering hierarchy with no data loading or state management changes. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 030a1cd. Configure here.
| it('navigates back when back button is pressed', () => { | ||
| const { getByTestId } = render(<OndoCampaignRwaSelectorView />); | ||
| fireEvent.press(getByTestId('header-back-button')); | ||
| fireEvent.press(getByTestId('ondo-rwa-selector-header-back-button')); |
There was a problem hiding this comment.
Stale HeaderCompactStandard mock is now dead code
Low Severity
The jest.mock for HeaderCompactStandard (lines 74–123) is now dead code. Since TrendingListHeader was changed to import HeaderStandard from @metamask/design-system-react-native instead of HeaderCompactStandard from components-temp, this ~50-line mock block is never exercised during any test in the file. It adds maintenance burden and could confuse future contributors into thinking the mock's hardcoded testID values (e.g. header-back-button, header-title) are still relevant.
Reviewed by Cursor Bugbot for commit 030a1cd. Configure here.
|





Description
This PR replaces
HeaderCompactStandardwithHeaderStandardfrom@metamask/design-system-react-nativeon Trending UI.Reason: Align Trending with the MetaMask design system and avoid
component-library/components-tempfor standard headers.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-704
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low risk UI refactor that swaps header components; main risk is minor regressions in header/back/close/testID wiring across Trending screens and related tests.
Overview
Updates Trending UI to use the design-system
HeaderStandardinstead of the temporaryHeaderCompactStandard, covering the main Trending list header and the network/price-change/time bottom-sheet headers.Adjusts a Rewards
OndoCampaignRwaSelectorViewtest to press the new back-button testID emitted by the updated header implementation.Reviewed by Cursor Bugbot for commit 030a1cd. Bugbot is set up for automated code reviews on this repo. Configure here.